
callback:     file format elf32-littlearm


Disassembly of section .init:

00010414 <_init>:
   10414:	e1a0c00d 	mov	ip, sp
   10418:	e92ddff0 	push	{r4, r5, r6, r7, r8, r9, sl, fp, ip, lr, pc}
   1041c:	e24cb004 	sub	fp, ip, #4
   10420:	e91baff0 	ldmdb	fp, {r4, r5, r6, r7, r8, r9, sl, fp, sp, pc}

Disassembly of section .plt:

00010424 <strcpy@plt-0x14>:
   10424:	e52de004 	push	{lr}		; (str lr, [sp, #-4]!)
   10428:	e59fe004 	ldr	lr, [pc, #4]	; 10434 <_init+0x20>
   1042c:	e08fe00e 	add	lr, pc, lr
   10430:	e5bef008 	ldr	pc, [lr, #8]!
   10434:	000104ec 	.word	0x000104ec

00010438 <strcpy@plt>:
   10438:	e28fc600 	add	ip, pc, #0, 12
   1043c:	e28cca10 	add	ip, ip, #16, 20	; 0x10000
   10440:	e5bcf4ec 	ldr	pc, [ip, #1260]!	; 0x4ec

00010444 <printf@plt>:
   10444:	e28fc600 	add	ip, pc, #0, 12
   10448:	e28cca10 	add	ip, ip, #16, 20	; 0x10000
   1044c:	e5bcf4e4 	ldr	pc, [ip, #1252]!	; 0x4e4

00010450 <memcpy@plt>:
   10450:	e28fc600 	add	ip, pc, #0, 12
   10454:	e28cca10 	add	ip, ip, #16, 20	; 0x10000
   10458:	e5bcf4dc 	ldr	pc, [ip, #1244]!	; 0x4dc

0001045c <puts@plt>:
   1045c:	e28fc600 	add	ip, pc, #0, 12
   10460:	e28cca10 	add	ip, ip, #16, 20	; 0x10000
   10464:	e5bcf4d4 	ldr	pc, [ip, #1236]!	; 0x4d4

00010468 <abort@plt>:
   10468:	e28fc600 	add	ip, pc, #0, 12
   1046c:	e28cca10 	add	ip, ip, #16, 20	; 0x10000
   10470:	e5bcf4cc 	ldr	pc, [ip, #1228]!	; 0x4cc

00010474 <strcat@plt>:
   10474:	e28fc600 	add	ip, pc, #0, 12
   10478:	e28cca10 	add	ip, ip, #16, 20	; 0x10000
   1047c:	e5bcf4c4 	ldr	pc, [ip, #1220]!	; 0x4c4

00010480 <__deregister_frame_info@plt>:
   10480:	e28fc600 	add	ip, pc, #0, 12
   10484:	e28cca10 	add	ip, ip, #16, 20	; 0x10000
   10488:	e5bcf4bc 	ldr	pc, [ip, #1212]!	; 0x4bc

0001048c <strncpy@plt>:
   1048c:	e28fc600 	add	ip, pc, #0, 12
   10490:	e28cca10 	add	ip, ip, #16, 20	; 0x10000
   10494:	e5bcf4b4 	ldr	pc, [ip, #1204]!	; 0x4b4

00010498 <__uClibc_main@plt>:
   10498:	e28fc600 	add	ip, pc, #0, 12
   1049c:	e28cca10 	add	ip, ip, #16, 20	; 0x10000
   104a0:	e5bcf4ac 	ldr	pc, [ip, #1196]!	; 0x4ac

000104a4 <memset@plt>:
   104a4:	e28fc600 	add	ip, pc, #0, 12
   104a8:	e28cca10 	add	ip, ip, #16, 20	; 0x10000
   104ac:	e5bcf4a4 	ldr	pc, [ip, #1188]!	; 0x4a4

000104b0 <__register_frame_info@plt>:
   104b0:	e28fc600 	add	ip, pc, #0, 12
   104b4:	e28cca10 	add	ip, ip, #16, 20	; 0x10000
   104b8:	e5bcf49c 	ldr	pc, [ip, #1180]!	; 0x49c

000104bc <free@plt>:
   104bc:	e28fc600 	add	ip, pc, #0, 12
   104c0:	e28cca10 	add	ip, ip, #16, 20	; 0x10000
   104c4:	e5bcf494 	ldr	pc, [ip, #1172]!	; 0x494

Disassembly of section .text:

000104c8 <_start>:
   104c8:	e3a0b000 	.word	0xe3a0b000
   104cc:	e3a0e000 	.word	0xe3a0e000
   104d0:	e49d1004 	.word	0xe49d1004
   104d4:	e1a0200d 	.word	0xe1a0200d
   104d8:	e52d2004 	.word	0xe52d2004
   104dc:	e52d0004 	.word	0xe52d0004
   104e0:	e59fc010 	.word	0xe59fc010
   104e4:	e52dc004 	.word	0xe52dc004
   104e8:	e59f000c 	.word	0xe59f000c
   104ec:	e59f300c 	.word	0xe59f300c
   104f0:	eaffffe8 	.word	0xeaffffe8
   104f4:	ebffffdb 	.word	0xebffffdb
   104f8:	00010818 	.word	0x00010818
   104fc:	0001078c 	.word	0x0001078c
   10500:	00010414 	.word	0x00010414

00010504 <deregister_tm_clones>:
   10504:	e59f301c 	ldr	r3, [pc, #28]	; 10528 <deregister_tm_clones+0x24>
   10508:	e59f001c 	ldr	r0, [pc, #28]	; 1052c <deregister_tm_clones+0x28>
   1050c:	e0603003 	rsb	r3, r0, r3
   10510:	e3530006 	cmp	r3, #6
   10514:	912fff1e 	bxls	lr
   10518:	e59f3010 	ldr	r3, [pc, #16]	; 10530 <deregister_tm_clones+0x2c>
   1051c:	e3530000 	cmp	r3, #0
   10520:	012fff1e 	bxeq	lr
   10524:	e12fff13 	bx	r3
   10528:	00020967 	.word	0x00020967
   1052c:	00020964 	.word	0x00020964
   10530:	00000000 	.word	0x00000000

00010534 <register_tm_clones>:
   10534:	e59f1024 	ldr	r1, [pc, #36]	; 10560 <register_tm_clones+0x2c>
   10538:	e59f0024 	ldr	r0, [pc, #36]	; 10564 <register_tm_clones+0x30>
   1053c:	e0601001 	rsb	r1, r0, r1
   10540:	e1a01141 	asr	r1, r1, #2
   10544:	e0811fa1 	add	r1, r1, r1, lsr #31
   10548:	e1b010c1 	asrs	r1, r1, #1
   1054c:	012fff1e 	bxeq	lr
   10550:	e59f3010 	ldr	r3, [pc, #16]	; 10568 <register_tm_clones+0x34>
   10554:	e3530000 	cmp	r3, #0
   10558:	012fff1e 	bxeq	lr
   1055c:	e12fff13 	bx	r3
   10560:	00020964 	.word	0x00020964
   10564:	00020964 	.word	0x00020964
   10568:	00000000 	.word	0x00000000

0001056c <__do_global_dtors_aux>:
   1056c:	e92d4010 	push	{r4, lr}
   10570:	e59f402c 	ldr	r4, [pc, #44]	; 105a4 <__do_global_dtors_aux+0x38>
   10574:	e5d43000 	ldrb	r3, [r4]
   10578:	e3530000 	cmp	r3, #0
   1057c:	18bd8010 	popne	{r4, pc}
   10580:	ebffffdf 	bl	10504 <deregister_tm_clones>
   10584:	e59f301c 	ldr	r3, [pc, #28]	; 105a8 <__do_global_dtors_aux+0x3c>
   10588:	e3530000 	cmp	r3, #0
   1058c:	0a000001 	beq	10598 <__do_global_dtors_aux+0x2c>
   10590:	e59f0014 	ldr	r0, [pc, #20]	; 105ac <__do_global_dtors_aux+0x40>
   10594:	ebffffb9 	bl	10480 <__deregister_frame_info@plt>
   10598:	e3a03001 	mov	r3, #1
   1059c:	e5c43000 	strb	r3, [r4]
   105a0:	e8bd8010 	pop	{r4, pc}
   105a4:	00020964 	.word	0x00020964
   105a8:	00000000 	.word	0x00000000
   105ac:	00010858 	.word	0x00010858

000105b0 <frame_dummy>:
   105b0:	e59f3040 	ldr	r3, [pc, #64]	; 105f8 <frame_dummy+0x48>
   105b4:	e92d4010 	push	{r4, lr}
   105b8:	e3530000 	cmp	r3, #0
   105bc:	0a000002 	beq	105cc <frame_dummy+0x1c>
   105c0:	e59f1034 	ldr	r1, [pc, #52]	; 105fc <frame_dummy+0x4c>
   105c4:	e59f0034 	ldr	r0, [pc, #52]	; 10600 <frame_dummy+0x50>
   105c8:	ebffffb8 	bl	104b0 <__register_frame_info@plt>
   105cc:	e59f0030 	ldr	r0, [pc, #48]	; 10604 <frame_dummy+0x54>
   105d0:	e5903000 	ldr	r3, [r0]
   105d4:	e3530000 	cmp	r3, #0
   105d8:	1a000001 	bne	105e4 <frame_dummy+0x34>
   105dc:	e8bd4010 	pop	{r4, lr}
   105e0:	eaffffd3 	b	10534 <register_tm_clones>
   105e4:	e59f301c 	ldr	r3, [pc, #28]	; 10608 <frame_dummy+0x58>
   105e8:	e3530000 	cmp	r3, #0
   105ec:	0afffffa 	beq	105dc <frame_dummy+0x2c>
   105f0:	e12fff33 	blx	r3
   105f4:	eafffff8 	b	105dc <frame_dummy+0x2c>
   105f8:	00000000 	.word	0x00000000
   105fc:	00020968 	.word	0x00020968
   10600:	00010858 	.word	0x00010858
   10604:	00020864 	.word	0x00020864
   10608:	00000000 	.word	0x00000000

0001060c <callback_cpy>:
#include <string.h>

typedef int (*function) (char *, char *);

int callback_cpy(char *des, char *src)
{
   1060c:	e92d4800 	push	{fp, lr}
   10610:	e28db004 	add	fp, sp, #4
   10614:	e24dd008 	sub	sp, sp, #8
   10618:	e50b0008 	str	r0, [fp, #-8]
   1061c:	e50b100c 	str	r1, [fp, #-12]
	strcpy(des, src);
   10620:	e51b100c 	ldr	r1, [fp, #-12]
   10624:	e51b0008 	ldr	r0, [fp, #-8]
   10628:	ebffff82 	bl	10438 <strcpy@plt>
}
   1062c:	e1a00003 	mov	r0, r3
   10630:	e24bd004 	sub	sp, fp, #4
   10634:	e8bd8800 	pop	{fp, pc}

00010638 <callback_ncpy>:

int callback_ncpy(char *des, char *src)
{
   10638:	e92d4800 	push	{fp, lr}
   1063c:	e28db004 	add	fp, sp, #4
   10640:	e24dd008 	sub	sp, sp, #8
   10644:	e50b0008 	str	r0, [fp, #-8]
   10648:	e50b100c 	str	r1, [fp, #-12]
	strcpy(src, "modified");
   1064c:	e51b300c 	ldr	r3, [fp, #-12]
   10650:	e59f203c 	ldr	r2, [pc, #60]	; 10694 <callback_ncpy+0x5c>
   10654:	e1a00003 	mov	r0, r3
   10658:	e1a01002 	mov	r1, r2
   1065c:	e3a03009 	mov	r3, #9
   10660:	e1a02003 	mov	r2, r3
   10664:	ebffff79 	bl	10450 <memcpy@plt>
	strncpy(des, src, 8);
   10668:	e3a02008 	mov	r2, #8
   1066c:	e51b100c 	ldr	r1, [fp, #-12]
   10670:	e51b0008 	ldr	r0, [fp, #-8]
   10674:	ebffff84 	bl	1048c <strncpy@plt>
	des[8] = '\0';
   10678:	e51b3008 	ldr	r3, [fp, #-8]
   1067c:	e2833008 	add	r3, r3, #8
   10680:	e3a02000 	mov	r2, #0
   10684:	e5c32000 	strb	r2, [r3]
}
   10688:	e1a00003 	mov	r0, r3
   1068c:	e24bd004 	sub	sp, fp, #4
   10690:	e8bd8800 	pop	{fp, pc}
   10694:	00010828 	.word	0x00010828

00010698 <test_other>:

void test_other(function fun)
{
   10698:	e92d4800 	push	{fp, lr}
   1069c:	e28db004 	add	fp, sp, #4
   106a0:	e24dd030 	sub	sp, sp, #48	; 0x30
   106a4:	e50b0030 	str	r0, [fp, #-48]	; 0xffffffd0
	char a[20];
	char b[20] = "xiaozhi";
   106a8:	e59f2068 	ldr	r2, [pc, #104]	; 10718 <test_other+0x80>
   106ac:	e24b302c 	sub	r3, fp, #44	; 0x2c
   106b0:	e8920003 	ldm	r2, {r0, r1}
   106b4:	e8830003 	stm	r3, {r0, r1}
   106b8:	e24b3024 	sub	r3, fp, #36	; 0x24
   106bc:	e3a02000 	mov	r2, #0
   106c0:	e5832000 	str	r2, [r3]
   106c4:	e2833004 	add	r3, r3, #4
   106c8:	e3a02000 	mov	r2, #0
   106cc:	e5832000 	str	r2, [r3]
   106d0:	e2833004 	add	r3, r3, #4
   106d4:	e3a02000 	mov	r2, #0
   106d8:	e5832000 	str	r2, [r3]
   106dc:	e2833004 	add	r3, r3, #4

	if (fun){
   106e0:	e51b3030 	ldr	r3, [fp, #-48]	; 0xffffffd0
   106e4:	e3530000 	cmp	r3, #0
   106e8:	0a000004 	beq	10700 <test_other+0x68>
		fun(a, b);
   106ec:	e24b102c 	sub	r1, fp, #44	; 0x2c
   106f0:	e24b2018 	sub	r2, fp, #24
   106f4:	e51b3030 	ldr	r3, [fp, #-48]	; 0xffffffd0
   106f8:	e1a00002 	mov	r0, r2
   106fc:	e12fff33 	blx	r3
	}

	printf("a = %s\n", a);
   10700:	e24b3018 	sub	r3, fp, #24
   10704:	e1a01003 	mov	r1, r3
   10708:	e59f000c 	ldr	r0, [pc, #12]	; 1071c <test_other+0x84>
   1070c:	ebffff4c 	bl	10444 <printf@plt>
}
   10710:	e24bd004 	sub	sp, fp, #4
   10714:	e8bd8800 	pop	{fp, pc}
   10718:	0001083c 	.word	0x0001083c
   1071c:	00010834 	.word	0x00010834

00010720 <r_test>:

void r_test(function fun)
{
   10720:	e92d4800 	push	{fp, lr}
   10724:	e28db004 	add	fp, sp, #4
   10728:	e24dd008 	sub	sp, sp, #8
   1072c:	e50b0008 	str	r0, [fp, #-8]
	test_other(fun);
   10730:	e51b0008 	ldr	r0, [fp, #-8]
   10734:	ebffffd7 	bl	10698 <test_other>
}
   10738:	e24bd004 	sub	sp, fp, #4
   1073c:	e8bd8800 	pop	{fp, pc}

00010740 <test>:

void test(char *a, char *b, int (*fun)(char *c, char *d))
{
   10740:	e92d4800 	push	{fp, lr}
   10744:	e28db004 	add	fp, sp, #4
   10748:	e24dd010 	sub	sp, sp, #16
   1074c:	e50b0008 	str	r0, [fp, #-8]
   10750:	e50b100c 	str	r1, [fp, #-12]
   10754:	e50b2010 	str	r2, [fp, #-16]
	strcat(a, b);
   10758:	e51b100c 	ldr	r1, [fp, #-12]
   1075c:	e51b0008 	ldr	r0, [fp, #-8]
   10760:	ebffff43 	bl	10474 <strcat@plt>
	printf("%s\n", a);
   10764:	e51b0008 	ldr	r0, [fp, #-8]
   10768:	ebffff3b 	bl	1045c <puts@plt>

	fun(a,b);
   1076c:	e51b3010 	ldr	r3, [fp, #-16]
   10770:	e51b100c 	ldr	r1, [fp, #-12]
   10774:	e51b0008 	ldr	r0, [fp, #-8]
   10778:	e12fff33 	blx	r3
	printf("%s\n", a);
   1077c:	e51b0008 	ldr	r0, [fp, #-8]
   10780:	ebffff35 	bl	1045c <puts@plt>
}
   10784:	e24bd004 	sub	sp, fp, #4
   10788:	e8bd8800 	pop	{fp, pc}

0001078c <main>:



int main()
{
   1078c:	e92d4800 	push	{fp, lr}
   10790:	e28db004 	add	fp, sp, #4
   10794:	e24dd088 	sub	sp, sp, #136	; 0x88
	char buf[128] = "xiaozhi";
   10798:	e59f2068 	ldr	r2, [pc, #104]	; 10808 <main+0x7c>
   1079c:	e24b3088 	sub	r3, fp, #136	; 0x88
   107a0:	e8920003 	ldm	r2, {r0, r1}
   107a4:	e8830003 	stm	r3, {r0, r1}
   107a8:	e24b3080 	sub	r3, fp, #128	; 0x80
   107ac:	e3a02078 	mov	r2, #120	; 0x78
   107b0:	e3a01000 	mov	r1, #0
   107b4:	e1a00003 	mov	r0, r3
   107b8:	ebffff39 	bl	104a4 <memset@plt>
	char *p;

	test_other(callback_cpy);
   107bc:	e59f0048 	ldr	r0, [pc, #72]	; 1080c <main+0x80>
   107c0:	ebffffb4 	bl	10698 <test_other>
	test_other(callback_ncpy);
   107c4:	e59f0044 	ldr	r0, [pc, #68]	; 10810 <main+0x84>
   107c8:	ebffffb2 	bl	10698 <test_other>

	test(buf, "wise", callback_cpy);
   107cc:	e24b3088 	sub	r3, fp, #136	; 0x88
   107d0:	e59f2034 	ldr	r2, [pc, #52]	; 1080c <main+0x80>
   107d4:	e59f1038 	ldr	r1, [pc, #56]	; 10814 <main+0x88>
   107d8:	e1a00003 	mov	r0, r3
   107dc:	ebffffd7 	bl	10740 <test>

	r_test(callback_cpy);
   107e0:	e59f0024 	ldr	r0, [pc, #36]	; 1080c <main+0x80>
   107e4:	ebffffcd 	bl	10720 <r_test>
		
	free(p);
   107e8:	e51b0008 	ldr	r0, [fp, #-8]
   107ec:	ebffff32 	bl	104bc <free@plt>
	p = "xiaozhi";
   107f0:	e59f3010 	ldr	r3, [pc, #16]	; 10808 <main+0x7c>
   107f4:	e50b3008 	str	r3, [fp, #-8]

	return 0;
   107f8:	e3a03000 	mov	r3, #0
}
   107fc:	e1a00003 	mov	r0, r3
   10800:	e24bd004 	sub	sp, fp, #4
   10804:	e8bd8800 	pop	{fp, pc}
   10808:	0001083c 	.word	0x0001083c
   1080c:	0001060c 	.word	0x0001060c
   10810:	00010638 	.word	0x00010638
   10814:	00010850 	.word	0x00010850

Disassembly of section .fini:

00010818 <_fini>:
   10818:	e1a0c00d 	mov	ip, sp
   1081c:	e92ddff0 	push	{r4, r5, r6, r7, r8, r9, sl, fp, ip, lr, pc}
   10820:	e24cb004 	sub	fp, ip, #4
   10824:	e91baff0 	ldmdb	fp, {r4, r5, r6, r7, r8, r9, sl, fp, sp, pc}
